home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Software Contest 3 / FM Towns Software Contest 3.iso / exp / video_t / no1 / c_sorse / sound.c < prev    next >
C/C++ Source or Header  |  1994-01-07  |  4KB  |  195 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <winb.h>
  4. #include <te.h>
  5. #include <fntb.h>
  6. #include <gui.h>
  7.  
  8. extern int    Dialog_sound ;
  9. extern int    Message_009d ;
  10. extern int    _001Message_009d ;
  11. extern int    _002Message_009d ;
  12. extern int    DButton_00a3 ;
  13. extern int    sound_on() ;
  14. extern int    _001DButton_00a3 ;
  15. extern int    sound_off() ;
  16. extern int    Message_00a7 ;
  17. extern int    _001Message_00a7 ;
  18. extern int    NumBox_sound ;
  19. extern int    _002Message_00a7 ;
  20.  
  21. #define ALIGN    4
  22. #define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)
  23.  
  24. /*    MMI_init 用データ    */
  25.  
  26. /*    ヘッダ    */
  27.  
  28. MMIINIT    initDataSOUND = { "MmiInit",  10, 0 } ;
  29.  
  30. /* Dialog_sound */
  31.  
  32. static MMIPACKET d001 = {    &Dialog_sound,
  33.                             NULL,
  34.                             &MJ_DIALOGL40,
  35.                             OFFSET(DIALOGL40),
  36.                             0
  37.                         } ;
  38. static DIALOGL40    d001d = {    MS_BTLEFTL40 | MS_EVMOSONL40,
  39.                               55,  44, 303, 227, 0, 7, 0,
  40.                             MS_SRECTL40 | MS_UFRAMEL40 | MS_FRAMEL40,
  41.                             NULL,   0,   0
  42.                         } ;
  43.  
  44. /* Message_009d */
  45.  
  46. static MMIPACKET d002 = {    &Message_009d,
  47.                             &Dialog_sound,
  48.                             &MJ_MSGL40,
  49.                             OFFSET(MSGL40),
  50.                             0
  51.                         } ;
  52. static MSGL40    d002d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  53.                               63,  53, 296,  76, 0,15,12,
  54.                             MS_NONEL40,
  55.                             "音声データ再生",
  56.                                2,  16,  16,
  57.                             MS_NONEL40,
  58.                               10,   0
  59.                         } ;
  60.  
  61. /* _001Message_009d */
  62.  
  63. static MMIPACKET d003 = {    &_001Message_009d,
  64.                             &Dialog_sound,
  65.                             &MJ_MSGL40,
  66.                             OFFSET(MSGL40),
  67.                             0
  68.                         } ;
  69. static MSGL40    d003d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  70.                               61,  83, 296, 106, 0,15, 0,
  71.                             MS_NONEL40,
  72.                             "音声データを再生するには、先に",
  73.                                2,  16,  16,
  74.                             MS_NONEL40,
  75.                                0,   0
  76.                         } ;
  77.  
  78. /* _002Message_009d */
  79.  
  80. static MMIPACKET d004 = {    &_002Message_009d,
  81.                             &Dialog_sound,
  82.                             &MJ_MSGL40,
  83.                             OFFSET(MSGL40),
  84.                             0
  85.                         } ;
  86. static MSGL40    d004d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  87.                               59, 107, 293, 130, 0,15, 0,
  88.                             MS_NONEL40,
  89.                             "音声データを読み込んで下さい",
  90.                                2,  16,  16,
  91.                             MS_NONEL40,
  92.                                0,   0
  93.                         } ;
  94.  
  95. /* DButton_00a3 */
  96.  
  97. static MMIPACKET d005 = {    &DButton_00a3,
  98.                             &Dialog_sound,
  99.                             &MJ_DBUTTONL40,
  100.                             OFFSET(DBUTTONL40),
  101.                             0
  102.                         } ;
  103. static DBUTTONL40    d005d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  104.                               83, 185, 162, 210, 0, 7, 0,
  105.                             MS_UFRAMEL40 | MS_FRAMEL40 | MS_DEFAULTL40,
  106.                             sound_on,
  107.                             0x0000
  108.                         } ;
  109.  
  110. /* _001DButton_00a3 */
  111.  
  112. static MMIPACKET d006 = {    &_001DButton_00a3,
  113.                             &Dialog_sound,
  114.                             &MJ_DBUTTONL40,
  115.                             OFFSET(DBUTTONL40),
  116.                             0
  117.                         } ;
  118. static DBUTTONL40    d006d = {    MS_BTLEFTL40 | MS_EVKEYONL40 | MS_EVMOSOFFL40,
  119.                              194, 185, 273, 210, 0, 7, 0,
  120.                             MS_UFRAMEL40 | MS_FRAMEL40,
  121.                             sound_off,
  122.                             0x0000
  123.                         } ;
  124.  
  125. /* Message_00a7 */
  126.  
  127. static MMIPACKET d007 = {    &Message_00a7,
  128.                             &Dialog_sound,
  129.                             &MJ_MSGL40,
  130.                             OFFSET(MSGL40),
  131.                             0
  132.                         } ;
  133. static MSGL40    d007d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  134.                               84, 186, 159, 209, 0,15,15,
  135.                             MS_NONEL40,
  136.                             "確定",
  137.                                2,  16,  16,
  138.                             MS_NONEL40,
  139.                               16,   0
  140.                         } ;
  141.  
  142. /* _001Message_00a7 */
  143.  
  144. static MMIPACKET d008 = {    &_001Message_00a7,
  145.                             &Dialog_sound,
  146.                             &MJ_MSGL40,
  147.                             OFFSET(MSGL40),
  148.                             0
  149.                         } ;
  150. static MSGL40    d008d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  151.                              194, 186, 270, 209, 0,15,15,
  152.                             MS_NONEL40,
  153.                             "取消",
  154.                                2,  16,  16,
  155.                             MS_NONEL40,
  156.                               16,   0
  157.                         } ;
  158.  
  159. /* NumBox_sound */
  160.  
  161. static MMIPACKET d009 = {    &NumBox_sound,
  162.                             &Dialog_sound,
  163.                             &MJ_NUMBOXL40,
  164.                             OFFSET(NUMBOXL40),
  165.                             0
  166.                         } ;
  167. static NUMBOXL40    d009d =     {    MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
  168.                              236, 143, 272, 166, 0, 7,15,
  169.                             MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
  170.                             0,
  171.                                1,  12,  12,
  172.                             MS_NONEL40,
  173.                                0,   0,
  174.                                0,   0,   4,   1,   0,
  175.                              263, 264
  176.                         } ;
  177.  
  178. /* _002Message_00a7 */
  179.  
  180. static MMIPACKET d010 = {    &_002Message_00a7,
  181.                             &Dialog_sound,
  182.                             &MJ_MSGL40,
  183.                             OFFSET(MSGL40),
  184.                             0
  185.                         } ;
  186. static MSGL40    d010d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  187.                               74, 143, 234, 166, 0,15,15,
  188.                             MS_NONEL40,
  189.                             "音声データ識別番号",
  190.                                2,  16,  16,
  191.                             MS_NONEL40,
  192.                                0,   0
  193.                         } ;
  194.  
  195.